<?php

require_once 'char.php';

class Stream
{
    protected $stream = array ();

    function __construct()
    {
    }

    function setStream($val)
    {
        for ($i=0; $i<strlen($val); $i++) {
            $this->stream[] = $val[$i];
        }
    }

    function &getCharRef($pos)
    {
        return $this->stream[$pos];
    }
}

?>